// Copyright 2007 Google Inc.
// All Rights Reserved.

package com.google.jessewilson.codesearch.gtagssearch;

import com.google.jessewilson.codesearch.api.SearchProvider;
import com.google.jessewilson.codesearch.api.spi.SearchProviderBackend;
import com.google.jessewilson.codesearch.api.spi.SearchProviderConfigurationEditor;
import com.google.jessewilson.codesearch.api.spi.SearchProviderParametersEditor;
import com.google.jessewilson.codesearch.configuration.SearchProviderConfiguration;

/**
 * @author Ted Mao (tmao@google.com)
 */
public class GtagsSearchProvider extends SearchProvider {

  @Override
  public String getName() {
    return "Google tags search";
  }

  public Class<? extends SearchProviderConfigurationEditor> getConfigurationEditor() {
    return GtagsConfigurationEditor.class;
  }

  public Class<? extends SearchProviderConfiguration> getConfiguration() {
    return GtagsConfiguration.class;
  }

  @Override
  public Class<? extends SearchProviderBackend> getBackend() {
    return GtagsSearchProviderBackend.class;
  }

  @Override
  public Class<? extends SearchProviderParametersEditor> getParametersEditor() {
    return GtagsSearchProviderParametersEditor.class;
  }

  @Override
  public SearchProviderConfiguration createDefaultConfiguration() {
    return new GtagsConfiguration.Builder()
        .executable("/home/build/google3/tools/tags/gtags.sh")
        .build();
  }
}
